<%@page import="java.io.* , java.util.*, java.sql.*,  com.myapp.struts.actionform.*,com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<%@page import="java.io.* , java.util.*, java.sql.*,  com.myapp.struts.dao.*, com.myapp.struts.beans.*"%>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<html:html lang="true">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title><bean:message key="welcome.title"/></title>
        <html:base/>
        <link href="../../../../css/cms.css" rel="stylesheet" type="text/css">
    </head>
    <body><br><br><br><br><br><br><br><br>
        <html:form  action="editmtype" method="POST">
            <table width="483" border="0" align="center" cellpadding="0" cellspacing="0" 
                   style="border-right: #000000 1px solid;
                   border-top: #000000 1px solid; border-left: #000000 1px solid;  border-bottom: #000000 1px solid;
                   font-size: 9pt; color: #000000; font-family: Arial;">
                <tr>
                    <th height="32" colspan="2" align="center" valign="middle"><span class="style4">Edit Item Type</span></th>
                </tr>
                <tr>
                    <td width="190" align="center" valign="middle">Item Type</td>
                    <td width="291" align="center" valign="middle">
                        <html:select property="typeEdit" >
                            <html:option value="Select"></html:option>
                            <%
        MaterialMasterDao imdao = new MaterialMasterDao();
        Vector gp = imdao.getTypes();
        if (gp != null) {
            System.out.println("IN..................." + gp.size());
            Iterator itg = gp.iterator();
            while (itg.hasNext()) {
                MaterialFormBean gb = (MaterialFormBean) itg.next();
                String pname = gb.getMaterialType();
                            %>
                            <html:option value="<%=pname%>"><%=pname%></html:option>
                            <%}

        }%>
                        </html:select></td>
                </tr>
                <tr>
                    <td height="15" align="center" valign="middle"></td>
                    <td align="center" valign="middle"><html:errors property="typeEdit"/></td>
                </tr>
                <tr>
                    <td align="center" valign="middle"><span class="style6">Rename Item Type</span></td>
                    <td align="center" valign="middle"><html:text property="newType"/></td>
                </tr>
                <tr>
                    <td align="center" valign="middle">&nbsp;</td>
                    <td align="center" valign="middle"><html:errors property="newType"/></td>
                </tr>
                <tr>
                    <td colspan="2" align="center" valign="middle"><html:submit/></td>
                </tr>
            </table>
        </html:form>
    </body>
</html:html>
